<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});




Route::group(['middleware'=>['web']],function(){
	Route::any('admin/login','Admin\LoginController@login');
    Route::any('admin/crypt','Admin\LoginController@crypt');
    Route::get('admin/code','Admin\LoginController@code');
});

Route::group(['middleware'=>['web','admin.login']],function(){
	Route::get('admin/index','Admin\IndexController@index');
	Route::get('admin/info','Admin\IndexController@info');
	Route::get('admin/quit','Admin\LoginController@quit');
    Route::any('admin/pass','Admin\IndexController@pass');
    Route::any('admin/cate/changeorder','Admin\CategoryController@changeOrder');
    Route::resource('admin/category','Admin\CategoryController');
});

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/
